package com.topscomm.cbo.controller.auto;

import com.topscomm.cbo.CboController;
import com.topscomm.cbo.pojo.CboApprovalNodeInsEntity;
import com.topscomm.cbo.service.ICboApprovalNodeInsService;
import com.topscomm.pub.vo.ResponseResult;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestParam;

import java.util.HashMap;
import java.util.List;
import java.util.Map;

public class CboApprovalNodeInsControllerAuto
	extends CboController<CboApprovalNodeInsEntity, ICboApprovalNodeInsService>
{
    @Override
    @GetMapping(value = "/dataCodeList")
    public ResponseResult<Object> dataCodeList(@RequestParam(required = false) Map<String, Object> paraMap)
    {
	Map<String, Object> codeMap = new HashMap<String, Object>();

	List<Map<String, Object>> isbackList = datacodeCache.getCodeListMap("CboYesNo", "", "sortcode");
	codeMap.put("isbackList", isbackList);
	List<Map<String, Object>> sourcetypeList = datacodeCache.getCodeListMap("CboApprovalSourceType", "",
		"sortcode");
	codeMap.put("sourcetypeList", sourcetypeList);
	List<Map<String, Object>> stateList = datacodeCache.getCodeListMap("TapApprovalNodeState", "", "sortcode");
	codeMap.put("stateList", stateList);
	List<Map<String, Object>> ismessageyesList = datacodeCache.getCodeListMap("CboYesNo", "", "sortcode");
	codeMap.put("ismessageyesList", ismessageyesList);
	List<Map<String, Object>> enabledList = datacodeCache.getCodeListMap("CboYesNo", "", "sortcode");
	codeMap.put("enabledList", enabledList);
	super.dataCodeList(paraMap);
	return ResponseResult.ok(codeMap);
    }
}
